package com.eci.example.webapi;

import com.eci.common.asset.core.R;
import com.eci.example.feign.ExampleFeign;
import com.eci.example.vo.ExampleReq;
import com.eci.example.vo.ExampleRsp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("example")
@Api(tags = "基础配置/定时任务")
@Slf4j
public class ExampleClientController {

    @Autowired
    ExampleFeign exampleFeign;

    @PostMapping("add")
    @ApiOperation(value = "分页列表", notes = "固定按顺序号排序,不支持自定义排序功能")
    @ResponseBody
    public R<ExampleRsp> add(@RequestBody @Validated ExampleReq req) {
        return exampleFeign.add(req);
    }

}
